import common from "../../lib/common/common.js"
const nickname = '小灵儿' // 改成自己机器人的名字

export class example extends plugin {
    constructor () {
      super({
        name: 'LY:绑定帮助',
        dsc: '绑定帮助',
        event: 'message',
        priority: -114514,
        rule: [
          {
            reg: /^#?(设备)?绑定帮助$/i, // 自己修改触发命令
            fnc: 'bdbz'
          }
        ]
      })
    }
  async bdbz(e) {
    const forward = [
      `如果已经绑定过stoken了.\n对${nickname}发送【#刷新ck】即可.\n如果还没绑定过sk或ck，请看【米游社登录】.\n如出现下列情况请看【米游社设备登录】.\nUID:xxx，米游社查询遇到验证码，请稍后再试.\n`,
      `【米游社登录】\n===========================\n1.对${nickname}发送【#扫码登录】.\n2.将${nickname}发送的二维码保存到本地.\n二维码会自动撤回，千万记得保存！\n3.打开米游社扫码登录选择【相册】，扫码登录即可.\n`,
      `【米游社设备登录】\n===========================\nIOS及安卓通用方法.\n1.使用抓包软件抓取米游社APP的请求.\n2.在请求头内找到【x-rpc-device_id】和【x-rpc-device_fp】.\n3.自行构造如下格式的信息.\n4.对${nickname}发送【#绑定设备{"device_id": "x-rpc-device_id的内容", "device_fp": "x-rpc-device_fp的内容"}】.\n5.提示绑定成功.\n===========================\n仅适用于安卓设备.\n1.进群获取APK文件Q群：981784501.\n2.使用常用米游社手机下载“设备绑定.apk”文件，并安装.\n3.打开后点击按钮复制.\n4.对${nickname}发送【#绑定设备{"deviceModel":"","androidVersion":"","deviceFingerprint":"","deviceName":"","deviceBoard":"","deviceProduct":"","oaid":""}】.\n5.提示绑定成功.\n===========================\n绑定完成请及时撤回！！！避免被盗用.\n`
    ]

    const msg = await common.makeForwardMsg(e, forward)
    await this.reply(msg)
    return true;
  }
}